package com.ssy.lingxi.search.controller.feign;

import com.ssy.lingxi.common.controller.BaseController;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.search.api.model.request.OrderRequest;
import com.ssy.lingxi.search.service.IOrderService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 订单服务类
 * @author jw.chen
 * @version 2.0.0
 * @date 2020/8/1
 */
@RestController
@RequestMapping("/search/commodity/order")
public class OrderController extends BaseController {

    @Resource
    private IOrderService orderService;

    /**
     * 查询会员
     * @param orderRequest 参数
     */
    @RequestMapping(value = "/getMemberIdList", method = RequestMethod.POST)
    public Wrapper<List<Long>> getMemberIdList(@RequestBody OrderRequest orderRequest) {
        return Wrapper.success(orderService.getMemberIdList(orderRequest));
    }
}
